import axios from "@/utils/axios";

// 分页查询试管列表
// 模糊查询
const testTubePage = (data) =>
  axios({
    url: "/base/testTube/page",
    method: "post",
    data,
  });

// 新增试管
const addTestTube = (data) =>
  axios({
    url: "/base/testTube/addOne",
    method: "post",
    data,
  });

// 编辑试管
const updateTestTube = (data) =>
  axios({
    url: "/base/testTube/updateOne",
    method: "post",
    data,
  });

// 删除单个试管
const delTube = (id) =>
  axios({
    url: `/base/testTube/deletedOne/${id}`,
    method: "delete",
  });

// 通过主键id查询单个试管
const getTubeDetail = (id) =>
  axios({
    url: `/base/testTube/getOne/${id}`,
    method: "get",
  });

export { testTubePage, addTestTube, updateTestTube, delTube, getTubeDetail };
